package com.ruoyi.merchant.service.impl;

import java.util.List;
import java.util.Map;

import com.ruoyi.common.annotation.DataSource;
import com.ruoyi.common.enums.DataSourceType;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.merchant.service.IMerchantDataNoticeLogService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.db.mapper.MerchantDataNoticeLogMapper;
import com.ruoyi.db.domain.MerchantDataNoticeLog;
/**
 * 商户回调通知日录Service业务层处理
 * 
 * @author ruoyi
 * @date 2023-12-09
 */
@Service
@DataSource(DataSourceType.SLAVE)
public class MerchantDataNoticeLogServiceImpl implements IMerchantDataNoticeLogService
{
    @Autowired
    private MerchantDataNoticeLogMapper merchantDataNoticeLogMapper;

    /**
     * 查询商户回调通知日录
     * 
     * @param id 商户回调通知日录主键
     * @return 商户回调通知日录
     */
    @Override
    public MerchantDataNoticeLog selectMerchantDataNoticeLogById(Long id)
    {
        return merchantDataNoticeLogMapper.selectMerchantDataNoticeLogById(id);
    }

    /**
     * 查询商户回调通知日录列表
     * 
     * @param merchantDataNoticeLog 商户回调通知日录
     * @return 商户回调通知日录
     */
    @Override
    public List<MerchantDataNoticeLog> selectMerchantDataNoticeLogList(MerchantDataNoticeLog merchantDataNoticeLog)
    {
        return merchantDataNoticeLogMapper.selectMerchantDataNoticeLogList(merchantDataNoticeLog);
    }

    /**
     * 查询商户回调通知日录列表
     *
     * @param merchantDataNoticeLog 商户回调通知日录
     * @return 商户回调通知日录
     */
    @Override
    public List<Map<String, Object>> selectMerchantDataNoticeLogMapList(MerchantDataNoticeLog merchantDataNoticeLog)
    {
        return merchantDataNoticeLogMapper.selectMerchantDataNoticeLogMapList(merchantDataNoticeLog);
    }

    /**
     * 新增商户回调通知日录
     * 
     * @param merchantDataNoticeLog 商户回调通知日录
     * @return 结果
     */
    @Override
    public int insertMerchantDataNoticeLog(MerchantDataNoticeLog merchantDataNoticeLog)
    {
        merchantDataNoticeLog.setCreateTime(DateUtils.getNowDate());
        return merchantDataNoticeLogMapper.insertMerchantDataNoticeLog(merchantDataNoticeLog);
    }

    /**
     * 修改商户回调通知日录
     * 
     * @param merchantDataNoticeLog 商户回调通知日录
     * @return 结果
     */
    @Override
    public int updateMerchantDataNoticeLog(MerchantDataNoticeLog merchantDataNoticeLog)
    {
        return merchantDataNoticeLogMapper.updateMerchantDataNoticeLog(merchantDataNoticeLog);
    }

    /**
     * 批量删除商户回调通知日录
     * 
     * @param ids 需要删除的商户回调通知日录主键
     * @return 结果
     */
    @Override
    public int deleteMerchantDataNoticeLogByIds(Long[] ids)
    {
        return merchantDataNoticeLogMapper.deleteMerchantDataNoticeLogByIds(ids);
    }

    /**
     * 删除商户回调通知日录信息
     * 
     * @param id 商户回调通知日录主键
     * @return 结果
     */
    @Override
    public int deleteMerchantDataNoticeLogById(Long id)
    {
        return merchantDataNoticeLogMapper.deleteMerchantDataNoticeLogById(id);
    }
}
